#include <linear_solver_interface.hpp>
Public Types | |
typedef MatrixT< T, I > | MatrixType |
typedef VectorT< T, I > | VectorType |
Public Member Functions | |
BaseLinearSolverInterface (void) | |
Default constructor. | |
~BaseLinearSolverInterface (void) | |
Destructor. | |
double | tolerance (void) const |
Get the solution tolerance. | |
void | tolerance (const double &tol) |
Set the solver tolerance. | |
int | maximumIterations (void) const |
Get the maximum iterations. | |
void | maximumIterations (const int &n) |
Set the maximum solution iterations. | |
void | solve (const VectorType &b, VectorType &x) const |
Solve w/ the specified RHS, put result in specified vector. | |
void | resolve (const VectorType &b, VectorType &x) const |
Solve again w/ the specified RHS, put result in specified vector. | |
MatrixType * | solve (const MatrixType &B) const |
Solve multiple systems w/ each column of the Matrix a single RHS. |
typedef MatrixT<T, I> gridpack::math::BaseLinearSolverInterface< T, I >::MatrixType |
Reimplemented in gridpack::math::LinearSolverT< T, I >, and gridpack::math::LinearSolverImplementation< T, I >.
typedef VectorT<T, I> gridpack::math::BaseLinearSolverInterface< T, I >::VectorType |
Reimplemented in gridpack::math::LinearSolverT< T, I >, and gridpack::math::LinearSolverImplementation< T, I >.
gridpack::math::BaseLinearSolverInterface< T, I >::BaseLinearSolverInterface | ( | void | ) |
Default constructor.
gridpack::math::BaseLinearSolverInterface< T, I >::~BaseLinearSolverInterface | ( | void | ) |
Destructor.
void gridpack::math::BaseLinearSolverInterface< T, I >::maximumIterations | ( | const int & | n | ) |
Set the maximum solution iterations.
n | new maximum number of iterations |
int gridpack::math::BaseLinearSolverInterface< T, I >::maximumIterations | ( | void | ) | const |
Get the maximum iterations.
void gridpack::math::BaseLinearSolverInterface< T, I >::resolve | ( | const VectorType & | b, | |
VectorType & | x | |||
) | const |
Solve again w/ the specified RHS, put result in specified vector.
Collective.
Solve a linear system of equations again with a different RHS. This can only be called after solve() has been called once and only if the coefficient matrix has not changed. Vector x
should contain the initial solution estimate. The final solution is returned in x
.
The communicator x
and b
must be the same and match that of the coefficient Matrix used for construction. The length of both x
and b
must the number of columns in the coeffienct Matrix used for constructor or passed the last call to setMatrix(). If these conditions are not met, an exception is thrown.
b | Vector containing right hand side of linear system | |
x | solution Vector |
MatrixType* gridpack::math::BaseLinearSolverInterface< T, I >::solve | ( | const MatrixType & | B | ) | const |
Solve multiple systems w/ each column of the Matrix a single RHS.
B | RHS matrix -- each column is used as a RHS Vector |
B
void gridpack::math::BaseLinearSolverInterface< T, I >::solve | ( | const VectorType & | b, | |
VectorType & | x | |||
) | const |
Solve w/ the specified RHS, put result in specified vector.
Collective.
Solve a linear system of equations. When called, Vector x
should contain the initial solution estimate. The final solution is returned in x
.
The communicator x
and b
must be the same and match that of the coefficient Matrix used for construction. The length of both x
and b
must the number of columns in the coeffienct Matrix used for constructor or passed the last call to setMatrix(). If these conditions are not met, an exception is thrown.
b | Vector containing right hand side of linear system | |
x | solution Vector |
void gridpack::math::BaseLinearSolverInterface< T, I >::tolerance | ( | const double & | tol | ) |
Set the solver tolerance.
tol | new solution tolerance |
double gridpack::math::BaseLinearSolverInterface< T, I >::tolerance | ( | void | ) | const |
Get the solution tolerance.